using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;

namespace PominaScale
{
	public partial class ProductMapper
	{
		#region Methods With Relation

		public static ProductModel ToModel(Product entity)
		{
			if (entity == null)
			{
				return null;
			}
			ProductModel model = new ProductModel();
			model.Description = entity.Description;
			model.Exchange = entity.Exchange;
			model.ProductID = entity.ProductID;
			model.ProductName = entity.ProductName;
			model.Unit = entity.Unit;
			model.Unit2 = entity.Unit2;
			return model;
		}
		public static Product ToEntity(Product entity, ProductModel model)
		{
			if (model == null)
			{
				return null;
			}
			entity.Description = model.Description;
			entity.Exchange = model.Exchange;
			entity.ProductID = model.ProductID;
			entity.ProductName = model.ProductName;
			entity.Unit = model.Unit;
			entity.Unit2 = model.Unit2;
			return entity;
		}

		#endregion

	}
}
